<template>
  <el-card shadow="hover" style="max-width: 800px; margin: 40px auto; border-radius: 16px;">
    <h2 style="margin-bottom: 24px;">开发者工具</h2>
    <el-form label-width="80px" style="margin-bottom: 24px;">
      <el-form-item label="API 地址">
        <el-input v-model="apiUrl" placeholder="输入API地址" />
      </el-form-item>
      <el-form-item>
        <el-button type="primary" @click="testApi" icon="el-icon-cpu">测试API</el-button>
      </el-form-item>
    </el-form>
    <el-divider>日志输出</el-divider>
    <el-input type="textarea" :rows="8" v-model="log" readonly style="background: #f8f8f8; border-radius: 8px;" />
  </el-card>
</template>

<script setup lang="ts">
import { ref } from 'vue'
const apiUrl = ref('http://localhost:5000/api/user')
const log = ref('')
function testApi() {
  log.value = '正在请求 ' + apiUrl.value + '...\n(此处可扩展为真实API请求)'
}
</script>
